/** \file
* Definition of the Twitter direct message database class.
* This file is part of Chorus, available at
* http://code.google.com/p/chorus-twitter/ . This file and all associated files
* and derivative works are bound by the terms of the LGPL 3.0 license,
* available at http://www.gnu.org/licenses/lgpl-3.0-standalone.html .
* \par Subversion URL:
* \$URL: http://chorus-twitter.googlecode.com/svn/branches/cpp/src/twitter/DMTree.hpp $
* \version \$Rev: 153 $
* \date    \$Date: 2010-04-06 07:43:42 +0000 (Tue, 06 Apr 2010) $
*/

#pragma once

#include "xml/DefaultTree.hpp"
#include "twitter/TwitterDM.hpp"

/// The Twitter direct message database.
class DMTree :
	public DefaultTree,
	public TypedXmlTree<TwitterDM>
{
public:
	/// The constructor.
	/// \param curlGlobInit The curl globals pointer.
	DMTree(CurlGlob *curlGlobInit);

	/// The destructor.
	virtual ~DMTree();

public:
	/// Get the file path for this database.
	/// \return The file path string.
	virtual const char *getFilePath() const
	{
		return "dms.xml";
	}

	/// Get the URL path for this database.
	/// \return The URL path string.
	virtual const char *getUrlPath() const
	{
		return "http://twitter.com/direct_messages.xml";
	}

	/// Get the element tag for this tree type.
	/// \return The element tag string.
	virtual const xmlChar *getElementTag() const
	{
		return (const xmlChar*)"direct-messages";
	}
};
